﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Inner.Master" CodeBehind="StudentCalendar.aspx.vb" Inherits="LecturerAppointmentSystem.StudentCalendar" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Calendar ID="Calendar1" runat="server" BackColor="White" 
        BorderColor="White" BorderWidth="1px" Font-Names="Verdana" Font-Size="9pt" 
        ForeColor="Black" Height="190px" NextPrevFormat="FullMonth" Width="350px">
        <DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
        <NextPrevStyle Font-Bold="True" Font-Size="8pt" ForeColor="#333333" 
            VerticalAlign="Bottom" />
        <OtherMonthDayStyle ForeColor="#999999" />
        <SelectedDayStyle BackColor="#333399" ForeColor="White" />
        <TitleStyle BackColor="White" BorderColor="Black" BorderWidth="4px" 
            Font-Bold="True" Font-Size="12pt" ForeColor="#333399" />
        <TodayDayStyle BackColor="#CCCCCC" />
    </asp:Calendar>
    <br />
    <br />
    <asp:Label ID="lbl_selectedDate" runat="server" Text="Label"></asp:Label>
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="StudentCalendarDataSource" EnableModelValidation="True">
        <Columns>
            <asp:BoundField DataField="TimeSlot" HeaderText="TimeSlot" 
                SortExpression="TimeSlot" />
            <asp:BoundField DataField="Place" HeaderText="Place" SortExpression="Place" />
            <asp:BoundField DataField="Agenda" HeaderText="Agenda" 
                SortExpression="Agenda" />
            <asp:BoundField DataField="Lecturer" HeaderText="Lecturer" 
                SortExpression="Lecturer" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="StudentCalendarDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:AppointmentsConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:AppointmentsConnectionString.ProviderName %>" 
        SelectCommand="SELECT [TimeSlot], [Place], [Agenda], [Lecturer] FROM [BookedAppointments] WHERE (([AppointmentDate] = ?) AND ([BookedBy] = ?))">
        <SelectParameters>
            <asp:QueryStringParameter Name="AppointmentDate" QueryStringField="Date" 
                Type="DateTime" />
            <asp:QueryStringParameter Name="BookedBy" QueryStringField="UserId" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
